package cn.com.w.bootdemo.controller;

import cn.com.w.bootdemo.config.ApplicationPropertiesConfig;
import cn.com.w.bootdemo.config.MetadataConfig;
import cn.com.w.bootdemo.util.ConfigrationCustomConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class DemoController {

    @Autowired
    MetadataConfig metadataConfig;

    @Autowired
    ApplicationPropertiesConfig applicationPropertiesConfig;


    @GetMapping("/data")
    public String getData(){
        String data = metadataConfig.getFilePath();

        final String name = applicationPropertiesConfig.getName();

        Map<String, String> configurations = ConfigrationCustomConfig.getConfigurations();


        return metadataConfig.toString();
    }


}
